{template 'common/header'}
<style>
    .sub-search input,.sub-search select{margin-bottom:0;}
</style>


<div class="panel panel-default">
    <div class="panel-heading">获奖者名单</div>
    <div class="panel-body">
        <div class="sub-item" id="table-list">
        <!--    <h4 class="sub-title">详细数据  |  总数:{$total}</h4>-->
            <form action="" method="post" onsubmit="">
                <div class="sub-content">
                    <table class="table table-hover">
                        <thead class="navbar-inner">
                            <tr>
                                <th style="width:50px;" class="row-first">选择</td>
                                 
                                <th style="width:120px;">id<i></i></th>
								<th style="width:120px;">奖项<i></i></th>
								<th style="width:550px;">openid<i></i></th>
                                <th style="width:120px;">电话<i></i></th>
								<th style="width:120px;">姓名<i></i></th>
                            <!--    <th style="width:60px;">操作</th>-->
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>
                            {loop $list_order $row}
                            <tr>
                                <td class="row-first"><input type="checkbox" name="select[]" value="{$row['id']}" /></td>
                                <td>{$row[id]}</td>	
								<td>{if $row['state'] == '1'}一等奖{/if}
									{if $row['state'] == '0'}二等奖{/if}
									{if $row['state'] == '3'}三等奖{/if}</td>	
								<td>{$row[openid]}</td>
                                <td>{$row['tel']}</td>
                                <td>{$row['name']}</td>
                            </tr>
                            {/loop}
                        </tbody>
                    </table>
                <!--    <table class="table">
                        <tr>
                            <td style="width:40px;" class="row-first"><input type="checkbox" onclick="selectall(this, 'select');" /></td>
                            <td>
                                <input type="submit" name="delete" value="删除" class="btn btn-primary" />
                                <input type="hidden" name="token" value="{$_W['token']}" />
                            </td>
                        </tr>
                    </table>-->
                </div>
            </form>
            {$pager}
        </div>
    </div>
</div>

<script>
    $(function () {
        //详细数据相关操作
        var tdIndex;
        $("#table-list thead").delegate("th", "mouseover", function () {
            if ($(this).find("i").hasClass("")) {
                $("#table-list thead th").each(function () {
                    if ($(this).find("i").hasClass("icon-sort"))
                        $(this).find("i").attr("class", "");
                });
                $("#table-list thead th").eq($(this).index()).find("i").addClass("icon-sort");
            }
        });
        $("#table-list thead th").click(function () {
            if ($(this).find("i").length > 0) {
                var a = $(this).find("i");
                if (a.hasClass("icon-sort") || a.hasClass("icon-caret-up")) { //递减排序
                    /*
                     数据处理代码位置
                     */
                    $("#table-list thead th i").attr("class", "");
                    a.addClass("icon-caret-down");
                } else if (a.hasClass("icon-caret-down")) { //递增排序
                    /*
                     数据处理代码位置
                     */
                    $("#table-list thead th i").attr("class", "");
                    a.addClass("icon-caret-up");
                }
                $("#table-list thead th,#table-list tbody:eq(0) td").removeClass("row-hover");
                $(this).addClass("row-hover");
                tdIndex = $(this).index();
                $("#table-list tbody:eq(0) tr").each(function () {
                    $(this).find("td").eq(tdIndex).addClass("row-hover");
                });
            }
        });
    });
</script>
{template 'common/footer'}